package com.yz.service.impl;

import com.yz.constatns.RedisKey;
import com.yz.service.ICommentService;
import com.yz.service.IInvitataionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;

/**
 * @className: scoreService
 * @author: shuishui
 * @date: 2023/01/05 11:28
 */
@Service
public class InvitataionScoreService {
    @Autowired
    private StringRedisTemplate stringRedisTemplate;

    @Autowired
    private IInvitataionService iInvitataionService;

    @Autowired
    private LikeService likeService;

    @Autowired
    private ICommentService commentService;

    public void addIdToRedis(Integer id){
        //将贴子分数和帖子的id添加到redis
        stringRedisTemplate.opsForSet().add(RedisKey.INVITATAION_SCORE,id.toString());
    }
}
